<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>客户登陆查询</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
    <script type="text/javascript">
        var grid = null;
        $(function () {
            $("#searchBar").ligerForm();
            $("#ligergrid1").ligerGrid({
                url: '<%=path%>/custpay/cmmOlStsTmp/initCmmOlStsTmpList.do',
                method : 'get',
                columns: [
                    { display: '手机号', name: 'mobile', width: 100, align: 'center', enabledSort:true},
                    { display: '姓名', name: 'cstNm', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '证件类型', name: 'certTypCd', minWidth: 100, align: 'center', enabledSort:true},
                    { display: '证件号码', name: 'certNo', minWidth: 150, align: 'center', enabledSort:true},
                    { display: '首次登录时间', name: 'firstLoginTm', minWidth: 100, align: 'center',render:renderDate, enabledSort:true},
                    { display: '最近登录时间', name: 'lastLoginTm', minWidth: 100, align: 'center',render:renderDate, enabledSort:true},
                    { display: '系统类型', name: 'osCdNm', minWidth: 150, align: 'center', enabledSort:true},
                    { display: 'APP版本号', name: 'appCode', minWidth: 150, align: 'center', enabledSort:true}
                ],
                pageSize:10,
                root:'rows',
                record:'total',
                hideLoadButton : true,
                width: '100%',
                height:'100%',
                heightDiff:-2,
                //checkbox:true,
                rownumbers:true
            });
            grid = liger.get("ligergrid1");

            $("#searchBtn").click(function(event) {
                var form = new liger.get("searchBar");
                var data = form.getData();
                for (name in data){
                    grid.setParm(name,data[name]);
                };
                grid.reload();
            });
            $("#clearBtn").click(function(event) {
                clearLigerForm("searchBar");
            });
        });
        //格式化时间
        function renderDate(rowdata, index, value){
            var dateStr = "";
            if(null != value){
                var date = new Date(value);
                dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
            }
            return dateStr;
        }
    </script>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
                <div class="fieldBox col_33">
                    <div class="label">手机号</div>
                    <div class="field">
                        <input name="mobile" id="mobile" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">姓名</div>
                    <div class="field">
                        <input name="cstNm" id="cstNm" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="clearFix"></div>
                <div class="btnsBox">
                    <span id="searchBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_1"></i>查询</span>
                    <span id="clearBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_19"></i>清空</span>
                    <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
                </div>
            </div>
        </form>
    </div>
</div>
<div id="ligergrid1" class="sq-grid"></div>
</body>
</html>
